#pragma once
#include "UIAnimation.h"
#include "UIElement.h"

namespace DirectUI
{
	class CUIPage : public CUIElement
	{
	public:
		DECLARE_CLASS(CUIPage, Page)
		

		UI_DECLARE_INTERFACE_MAP();

		UI_BEGIN_INTERFACE_PART(CUIPage, Page, IUIPage)
			virtual	void			SetCoreWindow(IUICoreWindow* lpCoreWindow);
			virtual	IUICoreWindow*	GetCoreWindow();
		UI_END_INTERFACE_PART(Page)

		CUIPage(void);
		virtual ~CUIPage(void);

		virtual void	OnKeyUp(IUIEvent* lpEvent)	
		{
			CUIObjectPtr<IUIElement> spElement = FindElementByName(L"TestBtn");
			if ( spElement )
				spElement->GotoState(L"PointerOver");
		}

		// IUIElement
		virtual	void ParseAttribute(LPCTSTR lpszAttr);

	private:
		CUIObjectPtr<IUICoreWindow>		m_spCoreWindow;
	};
};
